﻿package com.cipri.battle.events 
{
    import flash.events.Event;
    
    /**
     * ...
     * @author Ciprian Caba -> caba.ciprian@gmail.com
     */
    public class GameEvent extends Event 
    {
        
        public static const SHAPE_DOWN:String = "shapeDown";
        public static const MISSED_HIT:String = "missedHit";
        public static const SUCCESSFUL_HIT:String = "successfulHit";
        public static const GAME_OVER:String = "gameOver";
        
        private var _shapeId:int;
        
        public function GameEvent(type:String, shapeId:int = -1, bubbles:Boolean=false, cancelable:Boolean=false) 
        { 
            _shapeId = shapeId;
            super(type, bubbles, cancelable);
        } 
        
        public override function clone():Event 
        { 
            return new GameEvent(type, _shapeId, bubbles, cancelable);
        } 
        
        public override function toString():String 
        { 
            return formatToString("GameEvent", "type", "bubbles", "cancelable", "eventPhase"); 
        }
        
        public function get shapeId():uint { return _shapeId; }
        
    }
    
}